TriggerAction
Qualified name: mv::gui::TriggerAction
-
class TriggerAction : public mv::gui::WidgetAction
Trigger action class.
Action class for trigger
- Author
Thomas Kroes
Subclassed by ColorizeClustersAction, MergeClustersAction, PrefixClustersAction, RefreshClustersAction, RemoveClustersAction, mv::gui::IconAction, mv::gui::PluginTriggerAction, mv::gui::PluginTriggerPickerAction, mv::gui::ScriptTriggerAction, mv::gui::WatchVideoAction
Public Types
Public Functions
-
virtual void setIconByName(const QString &iconName) override
Set the icon by
iconNameand use the default icon font and version.- Parameters:
iconName – Name of the icon
-
virtual void setIconByName(const QString &iconName, const QString &iconFontName, const util::Version &iconFontVersion) override
Set the icon by
iconNameand possibly override the defaulticonFontNameandiconFontVersion.- Parameters:
iconName – Name of the icon
iconFontName – Name of the icon font
iconFontVersion – Version of the icon font
-
Q_INVOKABLE TriggerAction(QObject *parent, const QString &title)
Constructor.
- Parameters:
parent – Pointer to parent object
title – Title of the action
Protected Functions
-
virtual QWidget *getWidget(QWidget *parent, const std::int32_t &widgetFlags) override
Get widget representation of the trigger action.
- Parameters:
parent – Pointer to parent widget
widgetFlags – Widget flags for the configuration of the widget (type)
-
virtual void connectToPublicAction(WidgetAction *publicAction, bool recursive) override
Connect this action to a public action.
- Parameters:
publicAction – Pointer to public action to connect to
recursive – Whether to also connect descendant child actions
-
virtual void disconnectFromPublicAction(bool recursive) override
Disconnect this action from its public action.
- Parameters:
recursive – Whether to also disconnect descendant child actions
-
class PushButtonWidget : public QPushButton
Push button widget class for trigger action.
Protected Functions
-
PushButtonWidget(QWidget *parent, TriggerAction *triggerAction, const std::int32_t &widgetFlags)
Constructor.
- Parameters:
parent – Pointer to parent widget
triggerAction – Pointer to trigger action
widgetFlags – Widget flags
-
void resizeEvent(QResizeEvent *event) override
Override this event to make the push button square (in case only an icon is used)
- Parameters:
event – Pointer to resize event
-
void paintEvent(QPaintEvent *event) override
Override paint event to fix icon alignment issues.
- Parameters:
event – Pointer to paint event
Protected Attributes
-
std::int32_t _widgetFlags
Pointer to trigger action.
Friends
- friend class TriggerAction
-
PushButtonWidget(QWidget *parent, TriggerAction *triggerAction, const std::int32_t &widgetFlags)