SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A badge to show/toggle the visibility of all of a phrase's children. More...
#include <HierarchicalVisibilityBadge.h>
Public Types | |
using | DescriptivePhrase = smtk::view::DescriptivePhrase |
using | BadgeAction = smtk::view::BadgeAction |
Public Member Functions | |
smtkTypeMacro (smtk::extension::paraview::appcomponents::HierarchicalVisibilityBadge) | |
smtkSuperclassMacro (smtk::extension::qt::VisibilityBadge) | |
smtkSharedFromThisMacro (smtk::view::Badge) | |
smtkCreateMacro (smtk::view::Badge) | |
HierarchicalVisibilityBadge (smtk::view::BadgeSet &parent, const smtk::view::Configuration::Component &) | |
bool | appliesToPhrase (const DescriptivePhrase *phrase) const override |
Returns true if the badge should appear next to the given phrase: | |
std::string | tooltip (const DescriptivePhrase *) const override |
Return a tool-tip string for the badge that is relevant to this phrase. More... | |
std::string | icon (const DescriptivePhrase *phrase, const std::array< float, 4 > &) const override |
Returns a string for rendering the badge icon. More... | |
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::Badge | |
smtkTypeMacroBase (Badge) | |
Badge (const Badge &)=delete | |
Badge & | operator= (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. | |
Protected Member Functions | |
smtk::view::PhraseModel * | phraseModel () const |
GeometricVisibilityBadge::VisibilityState | phraseVisibility (const DescriptivePhrase *phrase) const |
void | setPhraseVisibility (DescriptivePhrase *phrase, bool visible) |
Recursively set the geometric visibility of this Phrase and all of its descendants. | |
Additional Inherited Members | |
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? | |
A badge to show/toggle the visibility of all of a phrase's children.
|
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.
|
overridevirtual |
Returns a string for rendering the badge icon.
The string is currently interpreted by qtDescriptivePhraseDelegate::paint() as scalable vector graphics (SVG).
The icon may change depending on (1) the state of the phrase or its parent view, (2) the background color of the phrase.
Implements smtk::view::Badge.
|
overridevirtual |
Return a tool-tip string for the badge that is relevant to this phrase.
An empty string (the default) indicates that no tooltip should be shown. If a non-empty string is returned, it should describe the meaning of the badge to the user. If the badge changes its SVG based on application state, the tip should be specific to its current state.
For example, a badge that controls visibility of a phrase's subject in a render-window should say either "Click to show <title>" when the phrase's subject is hidden or "Click to hide <title>" when the phrase's subject is visible.
Reimplemented from smtk::view::Badge.