PluginTriggerAction
Qualified name: mv::gui::PluginTriggerAction
-
class PluginTriggerAction : public mv::gui::TriggerAction
Plugin trigger action class.
Action class for triggering the creation of plugins.
By default, a plugin is automatically created when the trigger action is triggered. Custom plugin creation is possible by setting a creation handler function, see setCreatePluginFunction()
Note: This action is developed for internal use only
- Author
Thomas Kroes
Public Functions
-
Q_INVOKABLE PluginTriggerAction(QObject *parent, const plugin::PluginFactory *pluginFactory, const QString &title, const QString &tooltip, const QIcon &icon)
Constructor.
- Parameters:
parent – Pointer to parent object
pluginFactory – Pointer to plugin factory
title – Title of the plugin trigger action
icon – Icon
tooltip – Tooltip of the plugin trigger action
-
Q_INVOKABLE PluginTriggerAction(QObject *parent, const plugin::PluginFactory *pluginFactory, const QString &title, const QString &tooltip, const QIcon &icon, RequestPluginCallback requestPluginCallback)
Constructor.
- Parameters:
parent – Pointer to parent object
pluginFactory – Pointer to plugin factory
title – Title of the plugin trigger action
tooltip – Tooltip of the plugin trigger action
icon – Icon
requestPluginCallback – Callback which is invoked when the trigger action is triggered
-
Q_INVOKABLE PluginTriggerAction(const PluginTriggerAction &pluginTriggerAction, const QString &title)
Copy constructor.
- Parameters:
pluginTriggerAction – Reference to other plugin trigger action
-
const plugin::PluginFactory *getPluginFactory() const
Get the plugin factory.
- Returns:
Pointer to the plugin factory
-
QString getMenuLocation() const
Get menu location of the plugin trigger action.
- Returns:
Location of the plugin trigger action in a menu
-
void setMenuLocation(const QString &menuLocation)
Set menu location of the plugin trigger action.
- Parameters:
location – Location of the plugin trigger action in a menu
-
QString getSha() const
Get sha of plugin kind + trigger title.
- Returns:
Sha
-
mv::Datasets getDatasets() const
Get list of datasets that the plugin can work with when triggered.
- Returns:
Dataset list
-
WidgetAction *getConfigurationAction()
Get configuration action.
- Returns:
Action for configuring the plugin creation (if available)
-
void setConfigurationAction(WidgetAction *configurationAction)
Set configuration action.
- Parameters:
configurationAction – Pointer to action for configuring the plugin creation
-
void setText(const QString &text)
Override base class to also update location.
- Parameters:
text – Action text
-
void setDatasets(const mv::Datasets &datasets)
Set list of datasets that the plugin can work with when triggered.
- Parameters:
datasets – Dataset list
-
void setRequestPluginCallback(RequestPluginCallback requestPluginCallback)
Set the callback function which is invoked when the trigger action is triggered.
- Parameters:
requestPluginCallback – Request plugin callback function (invoked when the trigger action is triggered)
Protected Functions
-
virtual void initialize()
Sets up the trigger action.
Friends
- friend class plugin::PluginFactory