SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | Protected Attributes | List of all members
smtk::extension::qtDiagramLegendEntry Class Reference

All the information needed to represent a symbol used in a diagram. More...

#include <qtDiagramLegendEntry.h>

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

Public Member Functions

 smtkSuperclassMacro (QObject)
 
 smtkTypeMacroBase (smtk::extension::qtDiagramLegendEntry)
 
 qtDiagramLegendEntry (smtk::string::Token entryGroup, smtk::string::Token entryType, qtDiagramGenerator *generator, smtk::string::Token entryLabel=smtk::string::Token::Invalid)
 
qtDiagramGeneratorgenerator () const
 
qtDiagramScenescene () const
 
smtk::string::Token group () const
 
smtk::string::Token type () const
 
smtk::string::Token label () const
 
virtual bool toggleVisibility (bool show)
 
bool operator== (const qtDiagramLegendEntry &other) const
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, QWidget *widget)
 Draw a symbol into the legend. This method is called by the qtDiagramLegend's delegate.
 

Protected Attributes

qtDiagramGeneratorm_generator { nullptr }
 
smtk::string::Token m_group
 
smtk::string::Token m_type
 
smtk::string::Token m_label
 

Detailed Description

All the information needed to represent a symbol used in a diagram.

This object holds an object group ("arc", "node", etc.), an object type ("task dependency", "smtk::markup::arcs::BoundariesToShapes", etc.), and a method used to draw a symbol in the legend to illustrate their appearance in the diagram.

This object is also used to control the visibility of its targets in the diagram (i.e., clicking on the legend entry can toggle the visiblity of arcs/nodes/… of the given object type).

In the future, the legend may serve as a draggable UI element when the legend has an operation to create new instances of itself.


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