SBGAction Class Reference

This class is the base class for actions.

Signals

void favorited (bool)
 The action has been added to favorites or removed from favorites.
 

Constructors and destructor

 SBGAction (QObject *parent)
 
 SBGAction (const SBUUID &uuid=SBUUID(), QObject *parent=0)
 
 SBGAction (const QString &text, const SBUUID &uuid=SBUUID(), QObject *parent=0)
 
 SBGAction (const QIcon &icon, const QString &text, const SBUUID &uuid=SBUUID(), QObject *parent=0)
 
virtual ~SBGAction ()
 

Identity

virtual QString getName () const
 Returns the action's class name.
 
virtual SBUUID getUUID () const
 Returns the action's UUID.
 
void setIconFilename (const QString &filename="SAMSON.png")
 Define icon filename, icon file should be in current skin icon path.
 

Highlighting

void refresh ()
 Refresh all widgets containing the action.
 
bool getHighlightingFlag () const
 Returns the highlighting flag.
 
void setHighlightingFlag (bool highlightingFlag)
 Sets the highlighting flag.
 

Badge

unsigned int getBadge () const
 Returns the badge.
 
void setBadge (unsigned int badge)
 Sets the badge.
 
QColor getBadgeTextColor () const
 Returns the badge text color.
 
void setBadgeTextColor (const QColor &badgeTextColor)
 Sets the badge text color.
 
QColor getBadgeBackgroundColor () const
 Returns the badge background color.
 
void setBadgeBackgroundColor (const QColor &badgeBackgroundColor)
 Sets the badge background color.
 

Favorite

bool hasFavoriteFlag () const
 Returns true if the action has the favorite flag.
 
bool getFavoriteFlag () const
 Returns the favorite flag.
 
void setFavoriteFlag (bool favoriteFlag)
 Sets the favorite flag.
 

Setup

virtual bool setup (SBNodeIndexer *nodeIndexer)
 Initializes the action.
 

Action

virtual void onTriggerEvent (bool b)
 Slot called when the action is triggered.