Workspace 6.21.5
|
Tab widget for editing workspaces. More...
#include <Workspace/Presentation/workspacetabwidget.h>
Inherits QWidget.
Signals | |
void | connectionSelectionChanged (const CSIRO::DataExecution::Connection &connection, bool selected) |
void | currentChanged (CSIRO::DataExecution::Workspace *workspace) |
void | currentChanged (int index) |
void | dependencyVisibilityPolicyChanged () |
void | fitAllCompleted () |
void | gridSpacingChanged (int spacing) |
void | noteSelectionChanged (const QUuid &wspId, const QUuid ¬eItemId, bool selected) |
void | operationDimmedStatusChanged () |
void | opProgressBarsToggled (bool isChecked) |
void | progressBarsCanUpdate (bool visible) |
void | requestOpenWorkflow (const QString &filePath) |
void | rootTabClosed () |
void | sceneRectChanged (const QRectF &rect) |
void | scrolledBy (int dx, int dy) |
void | statusBarText (const QString &msg) |
void | usingGrid (bool enabled) |
void | viewportTransformChanged (const QMatrix &transform) |
void | workspaceInputOutputVariableVisibilityPolicyChanged () |
Static Public Member Functions | |
static bool | connectViewportInteractions (QList< WorkspaceTabWidget * > widgetList) |
static bool | connectViewportInteractions (WorkspaceTabWidget *widgetA, WorkspaceTabWidget *widgetB) |
static bool | disconnectViewportInteractions (QList< WorkspaceTabWidget * > widgetList) |
static bool | disconnectViewportInteractions (WorkspaceTabWidget *widgetA, WorkspaceTabWidget *widgetB) |
Protected Member Functions | |
void | hideEvent (QHideEvent *event) override |
void | showEvent (QShowEvent *event) override |
Properties | |
int | count |
int | currentIndex |
int | gridSpacing |
bool | progressBarsUpdatable |
bool | useGrid |
This widget does not derive from QTabWidget. This is because, while it looks like a QTabWidget and is implemented in terms of a QTabWidget, it does not support the full functionality and behaviour of a QTabWidget. Specifically, when a tab is removed from a QTabWidget, the QTabWidget::removeTab() function does not delete the widget the tab contains, whereas the WorkspaceTabWidget needs to rigorously enforce that the widget within a tab is deleted when the tab is closed. Also, a WorkspaceTabWidget only supports tabs containing a specific type of widget (which is an internal widget type, so no direct/public access to the tab's widget is permitted). What all this means for clients of this class is that you should treat it not like a QTabWidget, but rather as a new type of widget which has its own public interface. Its behaviour will be similar to that of a QTabWidget and it will look like a QTabWidget, but that should be considered more a coincidence than a requirement.
WorkspaceTabWidget | ( | WorkspaceController & | controller, |
const WorkspaceGraphicsEffectFactory & | graphicsEffectFactory = StandardWorkspaceGraphicsEffectFactory::getInstance() , |
||
QWidget * | parent = nullptr |
||
) |
WorkspaceTabWidget | ( | QWidget * | parent = nullptr | ) |
|
override |
|
slot |
|
slot |
|
slot |
index | The index of the tab to close. |
The root tab is treated specially. A request to close the root tab results in a rootTabClosed() signal being emitted, but it is up to something else to act on that signal. The WorkspaceTabWidget will not close the root tab except if the workspace it represents is deleted (which should only happen when the WorkspaceController this tab widget is attached to has its setWorkspace() function called.
|
signal |
|
static |
|
static |
widgetA | The first widget to connect. |
widgetB | The second widget to connect |
Connects the interactions of two tab widgets. Panning, opening nested workflows etc.
|
slot |
int count | ( | ) | const |
|
slot |
p | The point at which to create a new anchor. Note that p is in the tab widget's local co-ordinates. This will be automatically translated to the appropriate co-ordinates within the currently shown tab. |
|
signal |
|
signal |
int currentIndex | ( | ) | const |
|
slot |
|
signal |
|
slot |
Dims or restores all the operation icons
|
static |
|
static |
widgetA | The first widget to connect. |
widgetB | The second widget to connect |
Disconnects the interactions of two tab widgets, making them independent once more.
|
signal |
WorkspaceController * getController | ( | ) |
int getGridSpacing | ( | ) | const |
|
slot |
int getTab | ( | const DataExecution::Workspace & | workspace | ) |
QGraphicsView::ViewportAnchor getViewportTransformAnchor | ( | ) | const |
DataExecution::Workspace * getWorkspace | ( | int | index | ) |
index | The index of the tab to find. It must not be negative and it must be less than the number of tabs in the tab widget (ie less than the value returned by count()). |
|
signal |
|
overrideprotected |
When the widget is hidden, the progress bars will not need to be updated, so this function disables those updates. This will result in a progressBarsCanUpdate() signal being emitted.
bool isReadOnly | ( | ) | const |
bool isSuppressingConnectionWarnings | ( | ) |
bool isUsingExtendedSelection | ( | ) |
bool isUsingGrid | ( | ) | const |
bool isUsingPlaceholderGraphics | ( | ) | const |
|
slot |
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
|
signal |
|
signal |
|
slot |
|
slot |
|
signal |
|
signal |
|
signal |
void saveViewExtras | ( | ) |
|
signal |
|
slot |
dx | Delta in the x-dimension (in pixels) |
dy | Delta in the y-dimension (in pixels) |
Scrolls the current view within the WorkspaceTabWidget by the specified amounts, dx and dy. Generally this is needed when synchronising the tab widget's view with another.
|
signal |
|
slot |
|
slot |
loc | The location (as a percentage) of the connection arrow along a connection's length. |
|
slot |
controller | The workspace controller that this widget should use. If it is a null pointer, the function call has no effect. |
Normally, this function is only ever called once or not at all. The only time it is generally needed is if a WorkspaceTabWidget has been created in Qt Designer and it needs to share a workspace controller with another widget. That association has to be done by creating a controller outside of the widget and calling this function with that controller. The other widget would also use the same controller too.
|
slot |
|
slot |
graphicsEffectFactory | The effect factory to use when creating graphics effects. |
|
slot |
spacing | The new grid spacing. Note that whether or not the grid is enabled is controlled by a separate property. |
void setReadOnly | ( | bool | b | ) |
|
slot |
rect | The desired bounds of the SceneRect (i.e. the viewable area of the scene). |
Sets the viewable area of the scene attached to the currennt view to the specified rect. Generally this is needed when synchronising the tab widget's view with another.
void setSuppressingConnectionWarnings | ( | bool | b | ) | const |
b | Set to true if connection warnings are inappropriate |
void setUsingExtendedSelection | ( | bool | b | ) | const |
b | Set to true if the widget is being used by a tool rather than the workspace editor |
|
slot |
enabled | If true, then snap to grid will be enabled. The spacing of the grid is controlled by a separate property. |
void setUsingPlaceholderGraphics | ( | bool | b | ) |
|
slot |
transform | The desired viewport transform. |
Sets the viewport transform to the specified value. Generally this is needed when synchronising the tab widget's view with another.
void setViewportTransformAnchor | ( | QGraphicsView::ViewportAnchor | anchor | ) |
|
overrideprotected |
When the widget is shown, the progress bars will need to be updated, so this function enables those updates. This will result in a progressBarsCanUpdate() signal being emitted.
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
signal |
|
slot |
isChecked | Whether or not progress bars should be shown / hidden. |
|
signal |
|
signal |
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
read |
|
readwrite |
|
readwrite |
|
read |
|
readwrite |