Simulation Modeling Tool Kit
Public Types | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
smtk::extension::paraview::appcomponents::VisibilityBadge Class Reference
Inheritance diagram for smtk::extension::paraview::appcomponents::VisibilityBadge:
Collaboration diagram for smtk::extension::paraview::appcomponents::VisibilityBadge:

Public Types

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

Public Member Functions

 smtkTypeMacro (smtk::extension::paraview::appcomponents::VisibilityBadge)
 smtkSuperclassMacro (smtk::extension::qt::VisibilityBadge)
 smtkSharedFromThisMacro (smtk::view::Badge)
 smtkCreateMacro (smtk::view::Badge)
 VisibilityBadge (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.
void setPhraseVisibility (const DescriptivePhrase *phrase, int val)
 Set visibility for this phrase.
bool phraseVisibility (const DescriptivePhrase *phrase) const
- 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.

Protected Slots

void activeViewChanged (pqView *view)
 handle the active view changing, change the visible icons.
void representationAddedToActiveView (pqRepresentation *rep)
void representationRemovedFromActiveView (pqRepresentation *rep)
void componentVisibilityChanged (smtk::resource::ComponentPtr comp, bool visible)

Protected Member Functions

smtk::view::PhraseModelphraseModel () const

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?

Member Function Documentation

◆ icon()

std::string smtk::extension::paraview::appcomponents::VisibilityBadge::icon ( const DescriptivePhrase phrase,
const std::array< float, 4 > &  background 
) const

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.

◆ tooltip()

std::string smtk::extension::paraview::appcomponents::VisibilityBadge::tooltip ( const DescriptivePhrase ) const

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.

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