#include <Workspace/Presentation/workspaceview.h>
◆ DragState
Enumerator |
---|
Undefined | |
RubberbandDrag | |
ItemDrag | |
OperationConnectorDrag | |
OperationConnectorMovingDrag | |
◆ WorkspaceView()
- Parameters
-
scene | The scene that this view will be viewing. |
parent | The parent widget for this view. A QScrollArea is usually a good idea as a parent so that a large workspace can be more easily navigated by the user. |
initFocusOnSelection | Sets a flag that to focus on selected items on the first paint event. |
◆ ~WorkspaceView()
◆ alignHorizontally
void alignHorizontally |
( |
| ) |
|
|
slot |
◆ alignVertically
◆ centerOnItem
void centerOnItem |
( |
const QGraphicsItem * |
item | ) |
|
|
slot |
◆ checkLabelVisibility()
void checkLabelVisibility |
( |
bool |
visible | ) |
|
◆ clearAll()
Remove all workspace views and the workspace elements they represent. The end result is an empty workspace.
◆ clearSelection
Clears the selection for this workspace view.
◆ connectionArrowLocationChanged
void connectionArrowLocationChanged |
( |
int |
percent | ) |
|
|
signal |
◆ contextMenuEvent()
void contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
overrideprotected |
◆ copyWorkspaceSelection
void copyWorkspaceSelection |
( |
| ) |
|
|
slot |
◆ createAnchor
void createAnchor |
( |
const QPoint & |
pWidget | ) |
|
|
slot |
- Parameters
-
pWidget | The location in the widget's local co-ordinates at which a new connection anchor should be created. This will be automatically translated into scene co-ordinates. |
- Note
- This function creates the anchor as an undoable command.
◆ cutSelection
◆ deleteSelection
Deletes all selected operations.
◆ deleteSharedGLWidget
void deleteSharedGLWidget |
( |
| ) |
|
|
slot |
◆ dragLeaveEvent()
void dragLeaveEvent |
( |
QDragLeaveEvent * |
event | ) |
|
|
overrideprotected |
◆ dragMoveEvent()
void dragMoveEvent |
( |
QDragMoveEvent * |
event | ) |
|
|
overrideprotected |
◆ ensureCanScroll
void ensureCanScroll |
( |
const QPointF & |
deltaScene | ) |
|
|
slot |
◆ expandSceneToViewport
void expandSceneToViewport |
( |
| ) |
|
|
slot |
Whenever an operation is dropped on the view, the scene needs to expand to account for that operation's location in scene coordinates.
◆ fitAll
◆ fitAllCompleted
◆ fitSelection
◆ focusInEvent()
void focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
◆ focusOutEvent()
void focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
Improving consistency of UI
◆ getClickPoint()
QPointF getClickPoint |
( |
| ) |
const |
◆ getConnectionView()
- Parameters
-
con | A Connection that must be in the workspace this WorkspaceView represents. An assertion will be triggered if this condition is violated in a debug build. |
- Returns
- This workspace view's ConnectionView for con, or a null pointer if con is not in this workspace view's workspace (for non-debug builds).
◆ getDragState()
◆ getRubberBandClick()
QPoint getRubberBandClick |
( |
| ) |
|
◆ getRubberBandTool()
QRubberBand * getRubberBandTool |
( |
| ) |
|
◆ getUseGL()
◆ getWorkspace()
- Returns
- The workspace this workspace view represents.
◆ getWorkspaceScene()
- Returns
- The workspace scene used internally to represent the workspace.
- Note
- This function exists mostly for the benefit of the graphics scene widget subclasses which are used to represent operations and connections. Other client code would not normally call this function.
◆ getWorkspaceToolTip()
QString getWorkspaceToolTip |
( |
| ) |
const |
◆ hideAllUnpinnedRacks()
void hideAllUnpinnedRacks |
( |
| ) |
|
◆ hideUnpinnedRacks
void hideUnpinnedRacks |
( |
| ) |
|
|
signal |
◆ keyPressEvent()
void keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
◆ keyReleaseEvent()
void keyReleaseEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
◆ leaveEvent()
void leaveEvent |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
◆ mouseMoveEvent()
void mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
3 options, hand-drag, rubber-band selection and item(s) drag auto-scrolling
◆ mousePressEvent()
void mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ mouseReleaseEvent()
void mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Added to implement auto-scrolling functionality in Impl class
◆ nestedWorkspaceFromSelection
void nestedWorkspaceFromSelection |
( |
| ) |
|
|
slot |
Converts the currently selected operations into a nested workspace. If no operations are currently selected in the workspace this WorkspaceView represents, calling this function will have no effect.
◆ paintEvent()
void paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
◆ pasteWorkspaceSelectionFromClipboard
void pasteWorkspaceSelectionFromClipboard |
( |
| ) |
|
|
slot |
◆ refreshVisibility
void refreshVisibility |
( |
bool |
visible | ) |
|
|
signal |
◆ requestDisplayNestedWorkflowContents
◆ requestShowOperationInWorkflowTree
◆ resetOperationGraphics()
void resetOperationGraphics |
( |
| ) |
|
◆ resetView [1/2]
void resetView |
( |
const QGraphicsItem * |
item = nullptr | ) |
|
|
slot |
- Parameters
-
item | The scene item to put as close to the center of the view as possible after the zoom factor has been reset to 1. If this is a null pointer, the center of the bounding box around all the scene items will be centered instead. |
◆ resetView [2/2]
void resetView |
( |
const QPointF & |
p | ) |
|
|
slot |
- Parameters
-
p | The point to put as close to the center of the view as possible after the zoom factor has been reset to 1. |
◆ saveViewExtras()
Calling this function causes all workspace element widgets contained by this workspace view to save their view information. Note that it does not save the information of this workspace's own view if it is nested inside another.
◆ scroll
void scroll |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| |
|
slot |
◆ scrollContentsBy()
void scrollContentsBy |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| |
|
overrideprotected |
◆ scrolledBy
void scrolledBy |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| |
|
signal |
◆ selectAll()
◆ setDragState()
◆ setRubberBandClick()
void setRubberBandClick |
( |
QPoint |
click | ) |
|
◆ setUseGL()
void setUseGL |
( |
bool |
enable | ) |
|
|
static |
- Parameters
-
enable | If true, then all subsequently created workspace tabs will use QGLWidget as their viewport. This can lead to significant performance improvement, but it can also trigger various bugs in Qt's QGrahpicsView classes. This option is currently considered experimental. |
- See also
- getUseGL()
◆ setWorkspaceToolTip
void setWorkspaceToolTip |
( |
const QString & |
toolTip | ) |
|
|
slot |
◆ showStatusBarMessage()
void showStatusBarMessage |
( |
const QString & |
msg | ) |
|
|
inline |
◆ statusBarMessage
void statusBarMessage |
( |
const QString & |
msg | ) |
|
|
signal |
◆ unpinAndHideRacks
void unpinAndHideRacks |
( |
| ) |
|
|
signal |
◆ viewportTransformChanged
void viewportTransformChanged |
( |
const QMatrix & |
transform | ) |
|
|
signal |
◆ wheelEvent()
void wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
overrideprotected |
◆ zoomIn
◆ zoomOut