SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
All the information needed to represent a symbol used in a diagram. More...
#include <qtDiagramLegendEntry.h>
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) | |
qtDiagramGenerator * | generator () const |
qtDiagramScene * | scene () 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 | |
qtDiagramGenerator * | m_generator { nullptr } |
smtk::string::Token | m_group |
smtk::string::Token | m_type |
smtk::string::Token | m_label |
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.