SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | Protected Attributes | Properties | List of all members
smtk::extension::qtBaseTaskNode Class Referenceabstract

A Graphical Item that represents a task as a node in a scene. More...

#include <qtBaseTaskNode.h>

Inheritance diagram for smtk::extension::qtBaseTaskNode:
[legend]
Collaboration diagram for smtk::extension::qtBaseTaskNode:
[legend]

Public Types

enum  OutlineStyle : int { OutlineStyle::Normal, OutlineStyle::Active }
 Determine how the border of the node's visual representation should be rendered. More...
 
- Public Types inherited from smtk::extension::qtBaseNode
enum  ContentStyle : int { ContentStyle::Minimal, ContentStyle::Summary, ContentStyle::Details }
 Determine how the node is presented to users. More...
 

Public Member Functions

 smtkSuperclassMacro (qtBaseObjectNode)
 
 smtkTypeMacro (smtk::extension::qtBaseTaskNode)
 
 qtBaseTaskNode (qtDiagramGenerator *generator, smtk::task::Task *task, QGraphicsItem *parent=nullptr)
 
smtk::common::UUID nodeId () const override
 Return the task's UUID as the node's UUID.
 
smtk::resource::PersistentObjectobject () const override
 Return the task as this node's persistent object.
 
smtk::task::Tasktask () const
 Return the task this node represents.
 
virtual void setOutlineStyle (OutlineStyle cs)
 Set/get how the node's boundary should be rendered.
 
OutlineStyle outlineStyle () const
 
bool isActive () const
 Return true if the task is currently active (i.e., being worked on by the user).
 
virtual bool setupContextMenu (QMenu *)
 Setup a context menu to be displayed by the node's underlying widget. More...
 
virtual void updateTaskState (smtk::task::State prev, smtk::task::State next, bool active)=0
 Deals with state updates.
 
virtual void updateToMatchModifiedTask ()
 Deal with task updates (e.g., name or other configuration change). More...
 
- Public Member Functions inherited from smtk::extension::qtBaseObjectNode
 smtkSuperclassMacro (qtBaseNode)
 
 smtkTypeMacro (smtk::extension::qtBaseObjectNode)
 
 qtBaseObjectNode (qtDiagramGenerator *generator, smtk::resource::PersistentObject *obj, QGraphicsItem *parent=nullptr)
 
std::string name () const override
 Return the object's name as the node's name.
 
- Public Member Functions inherited from smtk::extension::qtBaseNode
 smtkSuperclassMacro (QGraphicsItem)
 
 smtkTypeMacroBase (smtk::extension::qtBaseNode)
 
 qtBaseNode (qtDiagramGenerator *scene, QGraphicsItem *parent=nullptr)
 
QRectF boundingRect () const override
 Return a dummy bounding-rect. More...
 
qtDiagramGeneratorgenerator () const
 Return the generator responsible for this node.
 
qtDiagramdiagram () const
 Return the diagram which owns the generator of this node.
 
qtDiagramScenescene () const
 Return the scene this node belongs to.
 
virtual void setContentStyle (ContentStyle cs)
 Set/get how much data the node should render inside its boundary.
 
ContentStyle contentStyle () const
 
virtual void dataUpdated ()
 Deal with updates (e.g., a configuration change that affects the node's visual appearance or interaction style). More...
 

Protected Attributes

smtk::task::Taskm_task { nullptr }
 
OutlineStyle m_outlineStyle { OutlineStyle::Normal }
 
- Protected Attributes inherited from smtk::extension::qtBaseNode
qtDiagramGeneratorm_generator { nullptr }
 
ContentStyle m_contentStyle { ContentStyle::Minimal }
 

Properties

OutlineStyle outlineStyle
 
- Properties inherited from smtk::extension::qtBaseObjectNode
smtk::resource::PersistentObject object
 
- Properties inherited from smtk::extension::qtBaseNode
ContentStyle contentStyle
 

Additional Inherited Members

- Signals inherited from smtk::extension::qtBaseNode
void nodeResized ()
 
void nodeMoved ()
 
- Protected Member Functions inherited from smtk::extension::qtBaseNode
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
virtual int updateSize ()
 Update the node bounds to fit its content.
 
void addToScene ()
 Adds the node to the scene. More...
 

Detailed Description

A Graphical Item that represents a task as a node in a scene.

Member Enumeration Documentation

◆ OutlineStyle

Determine how the border of the node's visual representation should be rendered.

Enumerator
Normal 

Render an unobtrusive, subdued border around the node.

Active 

Render a highlighted border around the node.

Member Function Documentation

◆ setupContextMenu()

virtual bool smtk::extension::qtBaseTaskNode::setupContextMenu ( QMenu *  )
inlinevirtual

Setup a context menu to be displayed by the node's underlying widget.

Returns true if setting up the menu was successful.

Reimplemented in smtk::extension::qtDefaultTaskNode.

◆ updateToMatchModifiedTask()

virtual void smtk::extension::qtBaseTaskNode::updateToMatchModifiedTask ( )
inlinevirtual

Deal with task updates (e.g., name or other configuration change).

This method is invoked when an operation changes a task name or makes other changes that require a visual update to the GUI.


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