Workspace 6.21.5
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
WorkspaceTreeWidget Class Reference

A tree view widget showing a Workspace hierarchy.

#include <Workspace/Presentation/workspacetreewidget.h>

Inheritance diagram for WorkspaceTreeWidget:
[legend]

Public Slots

void setController (CSIRO::Presentation::WorkspaceController *controller)
 

Signals

void clicked (CSIRO::DataExecution::Operation &operation)
 
void doubleClicked (CSIRO::DataExecution::Operation &operation)
 

Public Member Functions

 WorkspaceTreeWidget (QWidget *parent=nullptr)
 
 WorkspaceTreeWidget (WorkspaceController &controller, QWidget *parent=nullptr)
 
 ~WorkspaceTreeWidget () override
 
DataExecution::WorkspacegetWorkspace ()
 

Protected Member Functions

void collapseAll ()
 
void expandAll ()
 
void setFilterFlags (WorkspaceModelFilter::FilterFlags flags)
 
void setShowFilterToolBar (bool val)
 

Constructor & Destructor Documentation

◆ WorkspaceTreeWidget() [1/2]

WorkspaceTreeWidget ( WorkspaceController controller,
QWidget *  parent = nullptr 
)
Parameters
controllerThe controller that this tree widget should keep itself in sync with. The widget does not take ownership of the controller.
parentParent widget.

When using this constructor, the tree widget will not take ownership of controller. This is the preferred constructor, but it is not always possible to use it. Specifically, it cannot be used to create a widget in Qt Designer.

◆ WorkspaceTreeWidget() [2/2]

WorkspaceTreeWidget ( QWidget *  parent = nullptr)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

This constructor would not normally be used in client code. It exists primarily to facilitate the use of WorkspaceTreeWidget in Qt Designer. You will generally need to call setController() after construction to give the widget the controller you want. This constructor creates an internal controller object which will be deleted if setController() is called.

See also
setController()

◆ ~WorkspaceTreeWidget()

~WorkspaceTreeWidget ( )
override

Member Function Documentation

◆ clicked

void clicked ( CSIRO::DataExecution::Operation operation)
signal

◆ collapseAll()

void collapseAll ( )
protected

◆ doubleClicked

void doubleClicked ( CSIRO::DataExecution::Operation operation)
signal

◆ expandAll()

void expandAll ( )
protected

◆ getWorkspace()

Workspace * getWorkspace ( )
Returns
The root workspace of the controller.

◆ setController

void setController ( CSIRO::Presentation::WorkspaceController controller)
slot
Parameters
controllerThe workspace controller that this tree 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 WorkspaceTreeWidget 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.

◆ setFilterFlags()

void setFilterFlags ( WorkspaceModelFilter::FilterFlags  flags)
protected

◆ setShowFilterToolBar()

void setShowFilterToolBar ( bool  val)
protected