2018-12-30 15:46:15 +01:00
|
|
|
|
#include "plugin_support/PluginModule.h"
|
|
|
|
|
|
|
|
|
|
|
|
PluginModule::PluginModule(QString name, QString ident)
|
|
|
|
|
|
: m_name(std::move(name))
|
|
|
|
|
|
, m_ident(std::move(ident))
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PluginModule::setDisplayCategory(QString category)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_displayCategory = std::move(category);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PluginModule::registerAction(QAction *action, MenuLocation menu_location, ToolbarLocation toolbar_location)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-12-31 15:20:55 +01:00
|
|
|
|
void PluginModule::registerModuleAction(QString module_action, ModuleAction action)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_moduleActions.emplace(
|
|
|
|
|
|
std::move(module_action),
|
|
|
|
|
|
std::move(action)
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
2018-12-30 15:46:15 +01:00
|
|
|
|
|
2018-12-31 15:20:55 +01:00
|
|
|
|
const PluginModule::ModuleAction* PluginModule::findModuleAction(const QString &module_action) const
|
|
|
|
|
|
{
|
|
|
|
|
|
auto res = m_moduleActions.find(module_action);
|
|
|
|
|
|
if (res == m_moduleActions.end())
|
|
|
|
|
|
return nullptr;
|
|
|
|
|
|
return &res->second;
|
|
|
|
|
|
}
|