SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Rendering and interaction code for nodes that represent groups of resource and component nodes. More...
#include <qtGroupingNode.h>
Public Member Functions | |
smtkSuperclassMacro (qtBaseNode) | |
smtkTypeMacro (smtk::extension::qtGroupingNode) | |
qtGroupingNode (qtDiagramGenerator *generator, smtk::string::Token groupName, QGraphicsItem *parent=nullptr) | |
qtGroupingNode (const smtk::common::UUID &uid, const std::array< double, 2 > &location, qtDiagramGenerator *generator, smtk::string::Token groupName, QGraphicsItem *parent=nullptr) | |
smtk::common::UUID | nodeId () const override |
Return a UUID for this node. | |
QRectF | boundingRect () const override |
Get the bounding box of the node, which includes the border width and the label. | |
void | dataUpdated () override |
Handle renames, etc. | |
smtk::string::Token | groupName () const |
Return the group name string-token. | |
bool | setLabel (smtk::string::Token label) |
Set/get a label to use for the node's name instead of its group. More... | |
smtk::string::Token | label () const |
std::string | name () const override |
Return the group name as the node's name. More... | |
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... | |
qtDiagramGenerator * | generator () const |
Return the generator responsible for this node. | |
qtDiagram * | diagram () const |
Return the diagram which owns the generator of this node. | |
qtDiagramScene * | scene () 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 |
Protected Member Functions | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
Handle pointer hovers. | |
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
int | updateSize () override |
Update the node bounds to fit its content. | |
Protected Member Functions inherited from smtk::extension::qtBaseNode | |
QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
void | addToScene () |
Adds the node to the scene. More... | |
Protected Attributes | |
smtk::string::Token | m_group |
smtk::string::Token | m_label |
smtk::common::UUID | m_id |
Protected Attributes inherited from smtk::extension::qtBaseNode | |
qtDiagramGenerator * | m_generator { nullptr } |
ContentStyle | m_contentStyle { ContentStyle::Minimal } |
Properties | |
QPointF | pos |
qreal | rotation |
Properties inherited from smtk::extension::qtBaseNode | |
ContentStyle | contentStyle |
Additional Inherited Members | |
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... | |
Signals inherited from smtk::extension::qtBaseNode | |
void | nodeResized () |
void | nodeMoved () |
Rendering and interaction code for nodes that represent groups of resource and component nodes.
|
overridevirtual |
Return the group name as the node's name.
This will return m_label.data() if it is valid or m_group.data() otherwise.
Implements smtk::extension::qtBaseNode.
bool smtk::extension::qtGroupingNode::setLabel | ( | smtk::string::Token | label | ) |
Set/get a label to use for the node's name instead of its group.
If no label is set, the label() method will return m_group.