Workspace 6.21.5
Public Slots | Signals | Public Member Functions | Static Public Attributes | Properties | List of all members
SceneInteractionWidget Class Reference

A tree widget that allows users to view and modify a scene hierarchy defined in the workspace. More...

#include <Rendering/SceneInteraction/sceneinteractionwidget.h>

Inherits QTreeWidget.

Public Slots

void clearExisitingTree ()
 
void connectToWorkspace (CSIRO::DataExecution::Workspace *workspace)
 
void editSceneItemTriggered ()
 
void selectSceneItem (const CSIRO::Rendering::PickedItem &item, const CSIRO::Rendering::PickFilter &filter)
 

Signals

void addSceneItem (const QString &idPath, const CSIRO::Rendering::SceneItemType *typeBeingAdded)
 
void editItem (CSIRO::Rendering::SceneInteractionWidgetItem *item)
 
void focusCameraOnItem (const QString &idPath, const QString &outputName)
 
void focusCameraOnPosition (const CSIRO::Mesh::Vector3d &pos)
 
void itemLabelChanged (const QString &idPath, const CSIRO::Rendering::SceneItemType *type)
 
void itemSelected (CSIRO::Rendering::SceneInteractionWidgetItem *item)
 
void removeSceneItem (const QString &idPath, const CSIRO::Rendering::SceneItemType *type, const CSIRO::Rendering::SceneInteractionWidgetItem *item)
 

Public Member Functions

 SceneInteractionWidget (QWidget *parent=nullptr)
 
 ~SceneInteractionWidget () override
 
void addSceneItemTypeToAllowListForContextMenu (const SceneItemType *sit)
 
void allowAddSceneItemType (const SceneItemType *type, bool enabled)
 
void allowEditSceneItemType (const SceneItemType *type, QString menuLabel)
 
void clearAllowListForContextMenu ()
 
void enableContextMenu (bool enable)
 
void focusCameraOnPositionRelay (const CSIRO::Mesh::Vector3d &pos)
 
void getHeaders (QStringList *headersOut) const
 
void handleOperationLabelChangeEvent (const DataExecution::OperationLabelChangeEvent &event)
 
void handleOperationRemovedEvent (const DataExecution::RemoveOperationEvent &event)
 
bool isContextMenuEnabled () const
 
bool isDisplayingItemTypes () const
 
void itemLabelChangeTriggered (const QString &idPath, const SceneItemType *type)
 
bool labelChangeAllowed () const
 
void registerCallbackProposedOptionToAddSceneItemTypeIsApproved (std::function< bool(SceneInteractionWidget *, const SceneItemType *)> callbackToSetContextMenuRestrictions)
 
void setActiveAllowListForContextMenu (bool val)
 
void setBusy (bool busy, const QString &reason="")
 
void setDisplayingItemTypes (bool b)
 
bool setHeaders (const QStringList &headersIn)
 
void setHideDisabledContextMenuEntries (bool val)
 
void setLabelChangeAllowed (bool val)
 
void update (SceneBuilder &scene)
 

Static Public Attributes

static const Application::LogManager::MessageCategory LOG_SCENEINTERACTIONWIDGET
 

Properties

bool displayItemTypes
 
bool enableContextMenu
 

Detailed Description

Placing the string "siw_hide" in an operation label will cause this widget to skip over the operation. It will still parse any valid children. Placing the string "siw_hide_branch" will hide the operation AND any children

Constructor & Destructor Documentation

◆ SceneInteractionWidget()

SceneInteractionWidget ( QWidget *  parent = nullptr)

◆ ~SceneInteractionWidget()

~SceneInteractionWidget ( )
override

Member Function Documentation

◆ addSceneItem

void addSceneItem ( const QString &  idPath,
const CSIRO::Rendering::SceneItemType typeBeingAdded 
)
signal

Emitted when the user has selected to add a new scene item.

Parameters
idPathThe parent operation this new scene item should be added under. This is usually a TransformBuilder operation.
typeBeingAddedThe SceneItemType we want to add.

◆ addSceneItemTypeToAllowListForContextMenu()

void addSceneItemTypeToAllowListForContextMenu ( const SceneItemType sit)

◆ allowAddSceneItemType()

void allowAddSceneItemType ( const SceneItemType type,
bool  enabled 
)

◆ allowEditSceneItemType()

void allowEditSceneItemType ( const SceneItemType type,
QString  menuLabel 
)

◆ clearAllowListForContextMenu()

void clearAllowListForContextMenu ( )

◆ clearExisitingTree

void clearExisitingTree ( )
slot

◆ connectToWorkspace

void connectToWorkspace ( CSIRO::DataExecution::Workspace workspace)
slot

◆ editItem

void editItem ( CSIRO::Rendering::SceneInteractionWidgetItem item)
signal

Emitted when an item is about to be edited

Parameters
itemThe SceneInteractionWidgetItem that was selected.

◆ editSceneItemTriggered

void editSceneItemTriggered ( )
slot

◆ enableContextMenu()

void enableContextMenu ( bool  enable)

◆ focusCameraOnItem

void focusCameraOnItem ( const QString &  idPath,
const QString &  outputName 
)
signal

Emitted when the uses requests the camera to focus on a scene item.

Parameters
idPathThe workspace id path of the operation we want to focus on.
outputNameThe output name for the SceneItem.

◆ focusCameraOnPosition

void focusCameraOnPosition ( const CSIRO::Mesh::Vector3d pos)
signal

Emitted when the uses requests the camera to focus on a position.

Note: This is the final signal that can be connected to the GLWidget to handle a camera focus event the originated from a focusCameraOnItem signal.

◆ focusCameraOnPositionRelay()

void focusCameraOnPositionRelay ( const CSIRO::Mesh::Vector3d pos)

◆ getHeaders()

void getHeaders ( QStringList headersOut) const

◆ handleOperationLabelChangeEvent()

void handleOperationLabelChangeEvent ( const DataExecution::OperationLabelChangeEvent event)

◆ handleOperationRemovedEvent()

void handleOperationRemovedEvent ( const DataExecution::RemoveOperationEvent event)

◆ isContextMenuEnabled()

bool isContextMenuEnabled ( ) const

◆ isDisplayingItemTypes()

bool isDisplayingItemTypes ( ) const

◆ itemLabelChanged

void itemLabelChanged ( const QString &  idPath,
const CSIRO::Rendering::SceneItemType type 
)
signal

Emitted when the user has changed the name of a scene item.

Parameters
idPathThe workspace id path of the operation we want to update.
typeThe SceneItemType we want to update.

◆ itemLabelChangeTriggered()

void itemLabelChangeTriggered ( const QString &  idPath,
const SceneItemType type 
)

◆ itemSelected

void itemSelected ( CSIRO::Rendering::SceneInteractionWidgetItem item)
signal

Emitted when an item is selected

Parameters
itemThe SceneInteractionWidgetItem that was selected.

◆ labelChangeAllowed()

bool labelChangeAllowed ( ) const

◆ registerCallbackProposedOptionToAddSceneItemTypeIsApproved()

void registerCallbackProposedOptionToAddSceneItemTypeIsApproved ( std::function< bool(SceneInteractionWidget *, const SceneItemType *)>  callbackToSetContextMenuRestrictions)

◆ removeSceneItem

void removeSceneItem ( const QString &  idPath,
const CSIRO::Rendering::SceneItemType type,
const CSIRO::Rendering::SceneInteractionWidgetItem item 
)
signal

Emitted when the user has selected to remove a scene item.

Parameters
idPathThe workspace id path of the operation we want to remove.
typeThe SceneItemType we want to remove.
itemThe tree item

◆ selectSceneItem

void selectSceneItem ( const CSIRO::Rendering::PickedItem item,
const CSIRO::Rendering::PickFilter filter 
)
slot

◆ setActiveAllowListForContextMenu()

void setActiveAllowListForContextMenu ( bool  val)

◆ setBusy()

void setBusy ( bool  busy,
const QString &  reason = "" 
)

Toggles whether the widget should be active or not based on it being busy performing some action.

Parameters
busyTrue if the widget should be busy, false otherwise.
reasonA message describing the current reason for being busy or empty if not.

◆ setDisplayingItemTypes()

void setDisplayingItemTypes ( bool  b)

◆ setHeaders()

bool setHeaders ( const QStringList headersIn)

◆ setHideDisabledContextMenuEntries()

void setHideDisabledContextMenuEntries ( bool  val)

◆ setLabelChangeAllowed()

void setLabelChangeAllowed ( bool  val)

◆ update()

void update ( SceneBuilder scene)

Update the QTreeWidget based on the supplied tree.

Member Data Documentation

◆ LOG_SCENEINTERACTIONWIDGET

const Application::LogManager::MessageCategory LOG_SCENEINTERACTIONWIDGET
static

Property Documentation

◆ displayItemTypes

bool displayItemTypes
readwrite

◆ enableContextMenu

bool enableContextMenu
readwrite