SBGAction Class Reference

This class is the base class for actions.

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 ()


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.
void setIconPathname (const QString &filename)
 Define icon pathname, icon file can have an arbitrary path.
void setIconPixmap (const QPixmap &pixmap)
 Define icon based on a given pixmap.
static QIcon makeIcon (const QString &filename)
 Make an icon, with both a normal and disabled version, from a filename that includes the absolute path to an image.
static QIcon makeIcon (const QPixmap &normalPixmap)
 Make an icon, with both a normal and disabled version, from a normal pixmap.

User interface

virtual bool isLocked () const
 Returns true if the action is locked.
virtual bool isDiscoverable () const
 Returns true if can be discovered by the user.
virtual QString getDescriptionImagePath () const
 Returns a path to an image which will be placed into the action's description. If not specified, the action's icon might be used instead.


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


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.


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.
bool getFavoriteSignalConnectedFlag () const
 Returns true if the favorited signal is connected.
void setFavoriteSignalConnectedFlag (bool b)
 Sets the favorited signal connected flag.


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


SBGActionData * dataPointer
virtual void onTriggerEvent (bool b)
 Slot called when the action is triggered.
void actionStart (bool)
void actionEnd (bool)
void donePercent (int)
void doneText (const QString &)
void favorited (bool)
 The action has been added to favorites or removed from favorites.