SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | List of all members
smtk::extension::qt::TypeAndColorBadge Class Reference

A badge that illustrates the type and set the color of a persistent object. More...

#include <TypeAndColorBadge.h>

Inheritance diagram for smtk::extension::qt::TypeAndColorBadge:
[legend]
Collaboration diagram for smtk::extension::qt::TypeAndColorBadge:
[legend]

Public Types

using DescriptivePhrase = smtk::view::DescriptivePhrase
 
using BadgeAction = smtk::view::BadgeAction
 

Public Member Functions

 smtkTypeMacro (smtk::extension::qt::TypeAndColorBadge)
 
 smtkSuperclassMacro (smtk::view::ObjectIconBadge)
 
 TypeAndColorBadge (smtk::view::BadgeSet &, const smtk::view::Configuration::Component &)
 
bool action (const DescriptivePhrase *phrase, const BadgeAction &act) override
 Take an action when the badge is clicked. More...
 
- Public Member Functions inherited from smtk::view::ObjectIconBadge
 smtkTypeMacro (smtk::view::ObjectIconBadge)
 
 ObjectIconBadge (BadgeSet &, const Configuration::Component &)
 
bool appliesToPhrase (const DescriptivePhrase *phrase) const override
 This badge only applies to phrases with a persistent object that has an icon.
 
std::string tooltip (const DescriptivePhrase *phrase) const override
 The tool-tip string is the object's type.
 
std::string icon (const DescriptivePhrase *phrase, const std::array< float, 4 > &background) const override
 Returns an SVG string for rendering the badge icon. More...
 
- Public Member Functions inherited from smtk::view::Badge
 smtkTypeMacroBase (Badge)
 
 Badge (const Badge &)=delete
 
Badgeoperator= (const Badge &)=delete
 
bool isDefault () const
 Return whether this badge be invoked by non-specific user gestures. More...
 
void setIsDefault (bool isDefault)
 Set this badge as a default.
 

Additional Inherited Members

- Protected Attributes inherited from smtk::view::ObjectIconBadge
const BadgeSetm_parent { nullptr }
 
- Protected Attributes inherited from smtk::view::Badge
bool m_isDefault { false }
 Should this badge be invoked by non-specific user gestures when it is applicable?
 

Detailed Description

A badge that illustrates the type and set the color of a persistent object.

Member Function Documentation

◆ action()

bool smtk::extension::qt::TypeAndColorBadge::action ( const DescriptivePhrase ,
const BadgeAction  
)
overridevirtual

Take an action when the badge is clicked.

Return true if the action is supported (and was taken) by the badge for the given phrase; otherwise return false.

Reimplemented from smtk::view::Badge.


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