PeriDyno 1.2.1
Loading...
Searching...
No Matches
WtNodeWidget Class Reference

#include <WtNodeWidget.h>

Inheritance diagram for WtNodeWidget:
Collaboration diagram for WtNodeWidget:

Public Member Functions

 WtNodeWidget (std::shared_ptr< Node > base=nullptr)
 
virtual ~WtNodeWidget ()
 
std::string caption () const override
 
std::string name () const override
 Name makes this model unique.
 
std::string nodeTips () const override
 
std::string portCaption (PortType portType, PortIndex portIndex) const override
 Port caption is used in GUI to label individual ports.
 
std::string portTips (PortType portType, PortIndex portIndex) const override
 
std::string validationMessage () const override
 
unsigned int nPorts (PortType portType) const override
 
bool portCaptionVisible (PortType portType, PortIndex portIndex) const override
 It is possible to hide port caption in GUI.
 
bool allowExported () const override
 
bool tryInData (PortIndex portIndex, std::shared_ptr< WtNodeData > nodeData) override
 To test whether nodaData can be set as the input data for portIndex.
 
void setInData (std::shared_ptr< WtNodeData > data, PortIndex portIndex) override
 Triggers the algorithm.
 
NodeDataType dataType (PortType portType, PortIndex portIndex) const override
 
NodeValidationState validationState () const override
 
WtNodeDataModel::ConnectionPolicy portInConnectionPolicy (PortIndex portIndex) const override
 
std::shared_ptr< NodegetNode ()
 
std::shared_ptr< WtNodeDataoutData (PortIndex port) override
 
std::vector< FBase * > & getOutputFields () const
 
std::vector< FBase * > & getInputFields () const
 
void enableEditing ()
 When enabled, the scenegraph can be updated as long as the corresponding GUI is updated.
 
void disableEditing ()
 When disabled, the scenegraph can not be affected by the corresponding GUI.
 
- Public Member Functions inherited from WtNodeDataModel
 WtNodeDataModel ()
 
virtual ~WtNodeDataModel ()=default
 
virtual bool captionVisible () const
 It is possible to hide caption in GUI.
 
virtual bool hotkeyEnabled () const
 
virtual ConnectionPolicy portOutConnectionPolicy (PortIndex) const
 
WtNodeStyle const & nodeStyle () const
 
void setNodeStyle (WtNodeStyle const &style)
 
virtual bool resizable () const
 
virtual WtNodePainterDelegate * painterDelegate () const
 
virtual void inputConnectionCreated (WtConnection const &)
 
virtual void inputConnectionDeleted (WtConnection const &)
 
virtual void outputConnectionCreated (WtConnection const &)
 
virtual void outputConnectionDeleted (WtConnection const &)
 

Protected Types

using ExportNodePtr = std::shared_ptr<WtExportNode>
 
using ImportNodePtr = std::vector<std::shared_ptr<WtImportNode>>
 
using OutFieldPtr = std::vector<std::shared_ptr<WtFieldData>>
 
using InFieldPtr = std::vector<std::shared_ptr<WtFieldData>>
 

Protected Member Functions

virtual void updateModule ()
 

Protected Attributes

ImportNodePtr mNodeInport
 
ExportNodePtr mNodeExport
 
InFieldPtr mFieldInport
 
OutFieldPtr mFieldExport
 
std::shared_ptr< NodemNode = nullptr
 
NodeValidationState modelValidationState = NodeValidationState::Valid
 
std::string modelValidationError = std::string("Missing or incorrect inputs")
 

Private Attributes

bool mEditingEnabled = true
 

Additional Inherited Members

- Public Types inherited from WtNodeDataModel
enum class  ConnectionPolicy { One , Many }
 

Detailed Description

Definition at line 11 of file WtNodeWidget.h.

Member Typedef Documentation

◆ ExportNodePtr

using WtNodeWidget::ExportNodePtr = std::shared_ptr<WtExportNode>
protected

Definition at line 76 of file WtNodeWidget.h.

◆ ImportNodePtr

using WtNodeWidget::ImportNodePtr = std::vector<std::shared_ptr<WtImportNode>>
protected

Definition at line 77 of file WtNodeWidget.h.

◆ InFieldPtr

using WtNodeWidget::InFieldPtr = std::vector<std::shared_ptr<WtFieldData>>
protected

Definition at line 83 of file WtNodeWidget.h.

◆ OutFieldPtr

using WtNodeWidget::OutFieldPtr = std::vector<std::shared_ptr<WtFieldData>>
protected

Definition at line 82 of file WtNodeWidget.h.

Constructor & Destructor Documentation

◆ WtNodeWidget()

WtNodeWidget::WtNodeWidget ( std::shared_ptr< Node > base = nullptr)

Definition at line 11 of file WtNodeWidget.cpp.

Here is the call graph for this function:

◆ ~WtNodeWidget()

WtNodeWidget::~WtNodeWidget ( )
virtual

Definition at line 48 of file WtNodeWidget.cpp.

Member Function Documentation

◆ allowExported()

bool WtNodeWidget::allowExported ( ) const
inlineoverridevirtual

Reimplemented from WtNodeDataModel.

Definition at line 34 of file WtNodeWidget.h.

◆ caption()

std::string WtNodeWidget::caption ( ) const
overridevirtual

Implements WtNodeDataModel.

Definition at line 110 of file WtNodeWidget.cpp.

◆ dataType()

NodeDataType WtNodeWidget::dataType ( PortType portType,
PortIndex portIndex ) const
overridevirtual

Implements WtNodeDataModel.

Definition at line 66 of file WtNodeWidget.cpp.

Here is the call graph for this function:

◆ disableEditing()

void WtNodeWidget::disableEditing ( )

When disabled, the scenegraph can not be affected by the corresponding GUI.

Definition at line 368 of file WtNodeWidget.cpp.

◆ enableEditing()

void WtNodeWidget::enableEditing ( )

When enabled, the scenegraph can be updated as long as the corresponding GUI is updated.

Definition at line 363 of file WtNodeWidget.cpp.

◆ getInputFields()

std::vector< FBase * > & WtNodeWidget::getInputFields ( ) const

Definition at line 358 of file WtNodeWidget.cpp.

Here is the caller graph for this function:

◆ getNode()

std::shared_ptr< Node > WtNodeWidget::getNode ( )

Definition at line 338 of file WtNodeWidget.cpp.

Here is the caller graph for this function:

◆ getOutputFields()

std::vector< FBase * > & WtNodeWidget::getOutputFields ( ) const

Definition at line 353 of file WtNodeWidget.cpp.

Here is the caller graph for this function:

◆ name()

std::string WtNodeWidget::name ( ) const
overridevirtual

Name makes this model unique.

Implements WtNodeDataModel.

Definition at line 115 of file WtNodeWidget.cpp.

◆ nodeTips()

std::string WtNodeWidget::nodeTips ( ) const
overridevirtual

Reimplemented from WtNodeDataModel.

Definition at line 121 of file WtNodeWidget.cpp.

◆ nPorts()

unsigned int WtNodeWidget::nPorts ( PortType portType) const
overridevirtual

Implements WtNodeDataModel.

Definition at line 50 of file WtNodeWidget.cpp.

◆ outData()

std::shared_ptr< WtNodeData > WtNodeWidget::outData ( PortIndex port)
overridevirtual

Implements WtNodeDataModel.

Definition at line 105 of file WtNodeWidget.cpp.

◆ portCaption()

std::string WtNodeWidget::portCaption ( PortType ,
PortIndex  ) const
overridevirtual

Port caption is used in GUI to label individual ports.

Reimplemented from WtNodeDataModel.

Definition at line 132 of file WtNodeWidget.cpp.

Here is the call graph for this function:

◆ portCaptionVisible()

bool WtNodeWidget::portCaptionVisible ( PortType ,
PortIndex  ) const
overridevirtual

It is possible to hide port caption in GUI.

Reimplemented from WtNodeDataModel.

Definition at line 126 of file WtNodeWidget.cpp.

◆ portInConnectionPolicy()

WtNodeDataModel::ConnectionPolicy WtNodeWidget::portInConnectionPolicy ( PortIndex portIndex) const
overridevirtual

Reimplemented from WtNodeDataModel.

Definition at line 324 of file WtNodeWidget.cpp.

◆ portTips()

std::string WtNodeWidget::portTips ( PortType portType,
PortIndex portIndex ) const
overridevirtual

Reimplemented from WtNodeDataModel.

Definition at line 164 of file WtNodeWidget.cpp.

Here is the call graph for this function:

◆ setInData()

void WtNodeWidget::setInData ( std::shared_ptr< WtNodeData > nodeData,
PortIndex port )
overridevirtual

Triggers the algorithm.

Implements WtNodeDataModel.

Definition at line 207 of file WtNodeWidget.cpp.

Here is the call graph for this function:

◆ tryInData()

bool WtNodeWidget::tryInData ( PortIndex portIndex,
std::shared_ptr< WtNodeData > nodeData )
overridevirtual

To test whether nodaData can be set as the input data for portIndex.

Parameters
portIndexInput index
nodeDataInput data
Returns
true
false

Reimplemented from WtNodeDataModel.

Definition at line 258 of file WtNodeWidget.cpp.

Here is the call graph for this function:

◆ updateModule()

void WtNodeWidget::updateModule ( )
protectedvirtual

Definition at line 348 of file WtNodeWidget.cpp.

Here is the caller graph for this function:

◆ validationMessage()

std::string WtNodeWidget::validationMessage ( ) const
overridevirtual

Reimplemented from WtNodeDataModel.

Definition at line 343 of file WtNodeWidget.cpp.

◆ validationState()

NodeValidationState WtNodeWidget::validationState ( ) const
overridevirtual

Reimplemented from WtNodeDataModel.

Definition at line 319 of file WtNodeWidget.cpp.

Member Data Documentation

◆ mEditingEnabled

bool WtNodeWidget::mEditingEnabled = true
private

Definition at line 94 of file WtNodeWidget.h.

◆ mFieldExport

OutFieldPtr WtNodeWidget::mFieldExport
protected

Definition at line 86 of file WtNodeWidget.h.

◆ mFieldInport

InFieldPtr WtNodeWidget::mFieldInport
protected

Definition at line 85 of file WtNodeWidget.h.

◆ mNode

std::shared_ptr<Node> WtNodeWidget::mNode = nullptr
protected

Definition at line 88 of file WtNodeWidget.h.

◆ mNodeExport

ExportNodePtr WtNodeWidget::mNodeExport
protected

Definition at line 80 of file WtNodeWidget.h.

◆ mNodeInport

ImportNodePtr WtNodeWidget::mNodeInport
protected

Definition at line 79 of file WtNodeWidget.h.

◆ modelValidationError

std::string WtNodeWidget::modelValidationError = std::string("Missing or incorrect inputs")
protected

Definition at line 91 of file WtNodeWidget.h.

◆ modelValidationState

NodeValidationState WtNodeWidget::modelValidationState = NodeValidationState::Valid
protected

Definition at line 90 of file WtNodeWidget.h.


The documentation for this class was generated from the following files: