Workspace 6.21.5
Public Types | Public Member Functions | Protected Attributes | List of all members
SceneInteractionWidgetItem Class Reference

Class representing an individual scene item in the tree. Note that QTreeWidgetItem is not a QObject so we can't start adding signals and slots to it (https://stackoverflow.com/questions/19053355/error-when-connecting-a-qtreewidgetitem)

#include <Rendering/SceneInteraction/sceneinteractionwidget.h>

Inherits QTreeWidgetItem.

Public Types

using SceneInteractionWidgetItems = QVector< SceneInteractionWidgetItem * >
 

Public Member Functions

 SceneInteractionWidgetItem (QTreeWidgetItem *parent, const QStringList &text, Operation &op, const QString &idPath, const SceneItemType &itemType)
 
virtual bool acceptsItemTypeAsChild (const SceneItemType *proposedChild) const
 
virtual bool forceOperationWidgetRegenerate ()
 
virtual SceneInteractionWidgetItems getDependentChildren ()
 
QString getIdPathForPrimaryOperation ()
 
const SceneItemTypegetItemType () const
 
OperationgetOperation ()
 
const OperationgetOperation () const
 
virtual QString getOverridingCustomUiFile () const
 
OperationgetPrimaryOperation ()
 
const OperationgetPrimaryOperation () const
 
void invalidateAll ()
 
bool isReadOnly () const
 Returns true if the entire widget (and any operation widgets) is read-only.
 
bool isSameOperation (const Operation &op) const
 
bool isValid () const
 
virtual CSIRO::Widgets::OperationWidgetmakeOperationWidget (Operation *op, const QString &registeredUi={})
 
virtual bool onEditItem (QWidget *parent)
 
virtual void refreshDependentChildren ()
 
virtual bool refreshDependentChildrenOnTreeRebuild () const
 
void removeInvalidChildren ()
 
void setData (int column, int role, const QVariant &value) override
 
virtual void setLabel (const QString &label)
 
void setReadOnly (bool val)
 

Protected Attributes

bool valid_
 

Member Typedef Documentation

◆ SceneInteractionWidgetItems

Constructor & Destructor Documentation

◆ SceneInteractionWidgetItem()

SceneInteractionWidgetItem ( QTreeWidgetItem *  parent,
const QStringList text,
Operation op,
const QString &  idPath,
const SceneItemType itemType 
)

Member Function Documentation

◆ acceptsItemTypeAsChild()

bool acceptsItemTypeAsChild ( const SceneItemType proposedChild) const
virtual

Allows derived class to reject an item type as a child in the tree.

◆ forceOperationWidgetRegenerate()

bool forceOperationWidgetRegenerate ( )
virtual

If the item an operation widget is representing has changed, but the item represents the same operation as the existing item, we offer any derived class the chance to force the widget to be regenerated (replaced). This is useful in the case when, for example, a container has several items in it that offer a different view on the same operation (this was originally added for sensors in a solver-based app). Note that if we just get the item to update the widget, then we will get a call to updateData, which likely is not wanted. Simplest solution is to replace.

◆ getDependentChildren()

A "dependent child" is one that exists under its parent item in the tree, and feeds off the same operation as its parent. It doesn't have its own representative workflow element.

◆ getIdPathForPrimaryOperation()

QString getIdPathForPrimaryOperation ( )

◆ getItemType()

const SceneItemType & getItemType ( ) const
inline

◆ getOperation() [1/2]

Operation & getOperation ( )
inline

◆ getOperation() [2/2]

const Operation & getOperation ( ) const
inline

◆ getOverridingCustomUiFile()

QString getOverridingCustomUiFile ( ) const
virtual

Return a string pointing to a custom ui file. This ui will override other custom uis.

◆ getPrimaryOperation() [1/2]

Operation & getPrimaryOperation ( )
inline

◆ getPrimaryOperation() [2/2]

const Operation & getPrimaryOperation ( ) const
inline

◆ invalidateAll()

void invalidateAll ( )

◆ isReadOnly()

bool isReadOnly ( ) const

◆ isSameOperation()

bool isSameOperation ( const Operation op) const

◆ isValid()

bool isValid ( ) const
inline

◆ makeOperationWidget()

CSIRO::Widgets::OperationWidget * makeOperationWidget ( Operation op,
const QString &  registeredUi = {} 
)
virtual

Allows derived class to have some control over the widget creation.

◆ onEditItem()

bool onEditItem ( QWidget *  parent)
virtual

◆ refreshDependentChildren()

void refreshDependentChildren ( )
virtual

If reimplemented, this virtual method should create / update / delete child items in the tree as needed.

◆ refreshDependentChildrenOnTreeRebuild()

bool refreshDependentChildrenOnTreeRebuild ( ) const
virtual

If this returns true, then refreshDependentChildren will be called during rebuild of the tree. This ensures dependent children in the tree are refreshed. It's equivalent to saying "do you generate dependent child items in the tree?" of an item.

◆ removeInvalidChildren()

void removeInvalidChildren ( )

◆ setData()

void setData ( int  column,
int  role,
const QVariant &  value 
)
override

◆ setLabel()

void setLabel ( const QString &  label)
virtual

◆ setReadOnly()

void setReadOnly ( bool  val)
Parameters
valIf this is true, all operations in the scene will be read only

Member Data Documentation

◆ valid_

bool valid_
protected