diff --git a/ManiVault/src/TransformationPlugin.cpp b/ManiVault/src/TransformationPlugin.cpp index 38f9659fd..f6a84fd99 100644 --- a/ManiVault/src/TransformationPlugin.cpp +++ b/ManiVault/src/TransformationPlugin.cpp @@ -5,17 +5,13 @@ #include "TransformationPlugin.h" #include "Application.h" -namespace mv -{ - -namespace plugin +namespace mv::plugin { TransformationPlugin::TransformationPlugin(const PluginFactory* factory) : Plugin(factory), - _inputDatasets() + _typeAction(this, "Type") { - } mv::Datasets TransformationPlugin::getInputDatasets() const @@ -33,10 +29,14 @@ void TransformationPlugin::setInputDataset(const Dataset& inputData setInputDatasets({ inputDataset }); } +gui::OptionAction& TransformationPlugin::getTypeAction() +{ + return _typeAction; +} + TransformationPluginFactory::TransformationPluginFactory() : PluginFactory(Type::TRANSFORMATION) { - } QIcon TransformationPluginFactory::getIcon(const QColor& color /*= Qt::black*/) const @@ -50,4 +50,3 @@ QIcon TransformationPluginFactory::getCategoryIcon() const } } -} diff --git a/ManiVault/src/TransformationPlugin.h b/ManiVault/src/TransformationPlugin.h index 7ff4d9c5f..39eec3731 100644 --- a/ManiVault/src/TransformationPlugin.h +++ b/ManiVault/src/TransformationPlugin.h @@ -5,13 +5,11 @@ #pragma once #include "Plugin.h" +#include "actions/OptionAction.h" #include "Set.h" -namespace mv -{ - -namespace plugin +namespace mv::plugin { /** @@ -46,8 +44,8 @@ class CORE_EXPORT TransformationPlugin : public Plugin Dataset getInputDataset() { if (_inputDatasets.size() > 0) return Dataset(_inputDatasets[0].get()); - else - return Dataset(); + + return {}; } /** @@ -62,8 +60,16 @@ class CORE_EXPORT TransformationPlugin : public Plugin */ void setInputDataset(const Dataset& inputDataset); + + /** + * Get type action + * @return Reference to type action + */ + gui::OptionAction& getTypeAction(); + private: - Datasets _inputDatasets; /** One, or more, input dataset */ + Datasets _inputDatasets; /** One, or more, input dataset */ + gui::OptionAction _typeAction; /** Transformation type action */ }; /** @@ -81,7 +87,7 @@ class CORE_EXPORT TransformationPluginFactory : public PluginFactory TransformationPluginFactory(); /** Destructor */ - ~TransformationPluginFactory() = default; + ~TransformationPluginFactory() override = default; /** * Get plugin icon @@ -102,6 +108,4 @@ class CORE_EXPORT TransformationPluginFactory : public PluginFactory } -} - Q_DECLARE_INTERFACE(mv::plugin::TransformationPluginFactory, "ManiVault.TransformationPluginFactory")