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

QTreeView specialization for showing an Operation's inputs and outputs. More...

#include <Workspace/Widgets/IOModel/iotreewidget.h>

Inherits QTreeView.

Public Slots

void detachFromOperation ()
 

Public Member Functions

 IOTreeWidget (DataExecution::Operation &op, bool readOnly=false, QWidget *parent=nullptr)
 
 ~IOTreeWidget () override
 
IOModelcreateNewModel ()
 
DataExecution::OperationgetOperation ()
 
void populateWidgets ()
 

Protected Member Functions

virtual void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) override
 
void rowsInserted (const QModelIndex &parent, int start, int end) override
 

Detailed Description

The IOTreeWidget class uses its own custom model internally to represent the Operation it is attached to. This model should not be changed, so do not call setModel() on this widget.

Constructor & Destructor Documentation

◆ IOTreeWidget()

IOTreeWidget ( DataExecution::Operation op,
bool  readOnly = false,
QWidget *  parent = nullptr 
)
Parameters
opThe operation this IOTreeWidget will represent. The operation being represented cannot be changed later. The widget is set to represent only this operation. Note that the operation itself can still change its inputs, outputs, etc.
readOnlySet this to true if all operations are readOnly (default is false)
parentThe parent of this widget.

◆ ~IOTreeWidget()

~IOTreeWidget ( )
override

Member Function Documentation

◆ createNewModel()

IOModel & createNewModel ( )

◆ dataChanged()

void dataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
protectedvirtual

◆ detachFromOperation

void detachFromOperation ( )
slot

After this function returns, the widget will no longer respond to any change in the operation it was attached to (ie input or output additions or removals). The widget will also be hidden because it will no longer be safe to interact with it since this could result in the widget trying to query or update the operation.

This function is normally only called just before a call to QObject::deleteLater() to ensure that the widget does not try to access an operation which might not be safe to access when it eventually gets deleted.

◆ getOperation()

Operation & getOperation ( )
Returns
The operation this widget is displaying.

◆ populateWidgets()

void populateWidgets ( )

◆ rowsAboutToBeRemoved()

void rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotected

◆ rowsInserted()

void rowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotected